#Replication file for:
#Sam Schmitt, Isaac D. Mehlhaff, and Emily Cottle Ommundsen. "Integrating Classroom and Community with Undergraduate Civically Engaged Research. PS: Political Science and Politics. April 2023.

#if necessary, set working directory to location of data files

#setwd()

#read in data

rethink_comm <- read.csv("rethink_comm.csv")
leadership <- read.csv("leadership.csv")
knowledge_comm <- read.csv("knowledge_comm.csv")
optimist_change <- read.csv("optimist_change.csv")
change_polisci <- read.csv("change_polisci.csv")

#calculate response rate (data reported in "evals_standard.pdf")

round(28/43, 2)

#calculate percent who say the course led them to rethink their approach to community involvement

round(mean(rethink_comm$code, na.rm = TRUE), 2)

#calculate percent who say the course led them to change their approach to leadership

round(mean(leadership$code, na.rm = TRUE), 2)

#calculate percent who say the course increased their knowledge of their community

round(mean(knowledge_comm$code, na.rm = TRUE), 2)

#calculate percent who say the course made them more optimistic about their ability to make changes in their community

round(mean(optimist_change$code, na.rm = TRUE), 2)

#calculate percent who say the course led them to change their approach to the study of political science

round(mean(change_polisci$code, na.rm = TRUE), 2)
